package com.j2eefast.web.common;

public class BaseUrl {

    /**
     *  店铺详情地址：%s 店铺ID
     */
    public static final String SHOP_DETAIL = "http://items.aiyangniu.cn/shops/%s";

    /**
     * 爆款SKU详情，%s SKU ID
     */
    public static final String SUPER_ITEM_SKU_DETAIL = "http://market.aiyangniu.cn/items/%s";
    public static final String PAGE_SUPER_ITEM_SKU_DETAIL = "http://m.aiyangniu.cn/#/marketItemDetail?itemId=%s";

    /**
     * 普通商品SKU详情
     */
    public static final String ITEM_SKU_DETAIL = "http://items.aiyangniu.cn/items/%s";

    public static final String PAGE_ITEM_SKU_DETAIL = "http://m.aiyangniu.cn/#/item?itemId=%s";

    /**
     * 根据分类获取商品，%s  三级分类ID，%s 当前页码，默认0为第一页
     */
    public static final String GET_ITEMS_BY_CLASSIFY_ID = "http://items.aiyangniu.cn/items/listItemsPage?sortType=ITEM_SALES_DOWN&itemName=&name=&shopId=&classifyOne=&classifyTwo=&classifyThree=%s&limit=10&offset=%s&cTypeCode=";

    /**
     * 登录地址
     */
    public static final String LOGIN_URL = "http://account.aiyangniu.cn/users/login";

    /**
     * 聚牧城登录地址
     */
    public static final String JUMUC_LOGIN_URL = "http://app.jumuc.com/api/login";

    /**
     * 获取用户信息
     */
    public static final String USER_INFO = "http://account.aiyangniu.cn/users/user";


    public static String getGetItemsByClassifyId(Integer threeClassifyId,Integer pageNumber){
        return String.format(GET_ITEMS_BY_CLASSIFY_ID,threeClassifyId,(pageNumber - 1) * 10);
    }
}
